#if false
using System;
using System.Security;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
using System.Runtime.ConstrainedExecution;

namespace PrivilegeClass {
   internal sealed class SafeTokenHandle : SafeHandleZeroOrMinusOneIsInvalid {
      private SafeTokenHandle() : base(true) { }

      // 0 is an Invalid Handle
      internal SafeTokenHandle(IntPtr handle) : base(true) {
         SetHandle(handle);
      }

      internal static SafeTokenHandle InvalidHandle {
         get { return new SafeTokenHandle(IntPtr.Zero); }
      }

      [DllImport(NativeMethods.KERNEL32, SetLastError = true)]
      [SuppressUnmanagedCodeSecurity]
      [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
      private static extern Boolean CloseHandle(IntPtr handle);

      protected override Boolean ReleaseHandle() {
         return CloseHandle(handle);
      }
   }
}
#endif